FROM nvcr.io/nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04

# 配置onnx运行环境
ADD onnxruntime-linux-x64-gpu-1.16.3.tgz /usr/share/
ENV LD_LIBRARY_PATH=/usr/share/onnxruntime-linux-x64-gpu-1.16.3/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

# 拷贝应用程序
RUN mkdir /workspace
COPY ai-node /workspace/ai-node

# 拷贝模型文件
RUN mkdir /home/xtxk/workspace/yolov8/models -p
COPY yolov8m.onnx /home/xtxk/workspace/yolov8/models/yolov8m.onnx

WORKDIR /workspace

ENTRYPOINT [ "./ai-node",">","ai.log","&" ]